Rendering

Output Formats

Quarto provides the following output formats:

  • HTML

  • PDF

  • MS Word (docx)

  • OpenOffice (odt)

  • ePub

How To Render

1. In RStudio:

Click the Render button OR use the quarto R package:

library(quarto)
quarto_render("my-reproducible-manuscript.qmd") # defaults to html
quarto_render("my-reproducible-manuscript.qmd", output_format = "pdf")


2. Terminal: quarto render (--to [output format])

quarto render
quarto render my-reproducible-manuscript.qmd # defaults to html
quarto render my-reproducible-manuscript.qmd --to pdf

Rendering to Multiple Formats

---
title: "My Reproducible Manuscript"
format: 
  html: default
  docx: default
  pdf: default
---

Then:

library(quarto)
quarto_render("my-reproducible-manuscript.qmd")

OR

quarto render my-reproducible-manuscript.qmd

Note

the Render button will not work for multiple formats.

Journal Formats

Besides default html/pdf/docx, Quarto offers journal templates. See also Quarto Documentation: Journals.

  • acm: Association of Computing Machinery (ACM)
  • plos: Public Library of Science (PLOS)
  • agu: American Geophysical Union (AGU)
  • elsevier: Elsevier
  • biophysical-journal: Biophysical
  • acs: American Chemical Society (ACS)
  • jss: Journal of Statistical Software (JSS)

APA - apaquarto

Use a journal template from the start of your project (will create a new document):

  • In console
quarto use template quarto-journals/<template-name>


For example:

quarto use template wjschne/apaquarto

APA - apaquarto

APA - apaquarto

Exercise

  • Go to the Rendering chapter in the workshop book and refer to the instructions in the Exercise section.

  • You will render your document into html and docx formats.

10:00

What’s Next?

Sharing

  • Share your manuscript

    • Open science framework (OSF)

    • Github

    • Website/book

Publish

  • Publish to a quarto webpage (https://quartopub.com)

    • You can find the blue Publishing icon in the following locations:

      • The upper right of the file editor

      • The document viewer when viewing a document

      • The embedded viewer when running a Shiny application

      • The Plots pane

    • Click on icon

  • Also in terminal:

quarto publish quarto-pub